<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>Pandas介绍 | 机器学习（常用科学计算库的使用）基础定位、目标</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-katex/katex.min.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../Pandas/section2.html" />
    
    
    <link rel="prev" href="../Pandas/index.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="5.1"
        data-chapter-title="Pandas介绍"
        data-filepath="Pandas/section1.md"
        data-basepath=".."
        data-revision="Sat Jul 20 2019 23:53:14 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        机器学习（常用科学计算库的使用）基础定位、目标
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="ml_pre/index.html">
            
                
                    <a href="../ml_pre/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        机器学习概述
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="ml_pre/section1.html">
            
                
                    <a href="../ml_pre/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        人工智能概述
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="ml_pre/section2.html">
            
                
                    <a href="../ml_pre/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        人工智能发展历程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="ml_pre/section3.html">
            
                
                    <a href="../ml_pre/section3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        人工智能主要分支
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="ml_pre/section4.html">
            
                
                    <a href="../ml_pre/section4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        机器学习工作流程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="ml_pre/section5.html">
            
                
                    <a href="../ml_pre/section5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        机器学习算法分类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="ml_pre/section6.html">
            
                
                    <a href="../ml_pre/section6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        模型评估
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="ml_pre/section7.html">
            
                
                    <a href="../ml_pre/section7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        Azure机器学习模型搭建实验
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="ml_pre/section8.html">
            
                
                    <a href="../ml_pre/section8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        深度学习简介
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="env/index.html">
            
                
                    <a href="../env/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        机器学习基础环境安装与使用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="env/section1.html">
            
                
                    <a href="../env/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        库的安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="env/section2.html">
            
                
                    <a href="../env/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        jupyter notebook使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="Matplotlib/index.html">
            
                
                    <a href="../Matplotlib/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        Matplotlib
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="Matplotlib/section1.html">
            
                
                    <a href="../Matplotlib/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        Matplotlib之HelloWorld
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="Matplotlib/section2.html">
            
                
                    <a href="../Matplotlib/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        基础绘图功能 — 以折线图为例
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="Matplotlib/section3.html">
            
                
                    <a href="../Matplotlib/section3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        常见图形绘制
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="Numpy/index.html">
            
                
                    <a href="../Numpy/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        Numpy
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="Numpy/section1.html">
            
                
                    <a href="../Numpy/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        Numpy的优势
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="Numpy/section2.html">
            
                
                    <a href="../Numpy/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        N维数组-ndarray
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="Numpy/section3.html">
            
                
                    <a href="../Numpy/section3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        基本操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="Numpy/section4.html">
            
                
                    <a href="../Numpy/section4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        ndarray运算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="Numpy/section5.html">
            
                
                    <a href="../Numpy/section5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        数组间的运算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="Numpy/section6.html">
            
                
                    <a href="../Numpy/section6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        数学：矩阵
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="Pandas/index.html">
            
                
                    <a href="../Pandas/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        Pandas
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="5.1" data-path="Pandas/section1.html">
            
                
                    <a href="../Pandas/section1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        Pandas介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="Pandas/section2.html">
            
                
                    <a href="../Pandas/section2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        Pandas数据结构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="Pandas/section3.html">
            
                
                    <a href="../Pandas/section3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        基本数据操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="Pandas/section4.html">
            
                
                    <a href="../Pandas/section4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        DataFrame运算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="Pandas/section5.html">
            
                
                    <a href="../Pandas/section5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        Pandas画图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="Pandas/section6.html">
            
                
                    <a href="../Pandas/section6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        文件读取与存储
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.7" data-path="Pandas/section7.html">
            
                
                    <a href="../Pandas/section7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.7.</b>
                        
                        高级处理-缺失值处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.8" data-path="Pandas/section8.html">
            
                
                    <a href="../Pandas/section8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.8.</b>
                        
                        高级处理-数据离散化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.9" data-path="Pandas/section9.html">
            
                
                    <a href="../Pandas/section9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.9.</b>
                        
                        高级处理-合并
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.10" data-path="Pandas/section10.html">
            
                
                    <a href="../Pandas/section10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.10.</b>
                        
                        高级处理-交叉表与透视表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.11" data-path="Pandas/section11.html">
            
                
                    <a href="../Pandas/section11.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.11.</b>
                        
                        高级处理-分组与聚合
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.12" data-path="Pandas/section12.html">
            
                
                    <a href="../Pandas/section12.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.12.</b>
                        
                        案例
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="ReadingExtension/index.html">
            
                
                    <a href="../ReadingExtension/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        拓展知识
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="ReadingExtension/1.完整机器学习项目的流程.html">
            
                
                    <a href="../ReadingExtension/1.完整机器学习项目的流程.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        完整机器学习项目的流程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="ReadingExtension/2.独立同分布.html">
            
                
                    <a href="../ReadingExtension/2.独立同分布.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        独立同分布
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >机器学习（常用科学计算库的使用）基础定位、目标</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="51pandas&#x4ECB;&#x7ECD;">5.1Pandas&#x4ECB;&#x7ECD;</h1>
<h2 id="&#x5B66;&#x4E60;&#x76EE;&#x6807;">&#x5B66;&#x4E60;&#x76EE;&#x6807;</h2>
<ul>
<li>&#x76EE;&#x6807;<ul>
<li>&#x4E86;&#x89E3;&#x4EC0;&#x4E48;&#x662F;pandas</li>
<li>&#x4E86;&#x89E3;Numpy&#x4E0E;Pandas&#x7684;&#x4E0D;&#x540C;</li>
<li>&#x77E5;&#x9053;&#x4F7F;&#x7528;pandas&#x7684;&#x4F18;&#x52BF;</li>
</ul>
</li>
</ul>
<hr>
<h2 id="1-pandas&#x4ECB;&#x7ECD;">1 Pandas&#x4ECB;&#x7ECD;</h2>
<p><img src="images/pandas.png" alt="pandas"></p>
<ul>
<li>2008&#x5E74;WesMcKinney&#x5F00;&#x53D1;&#x51FA;&#x7684;&#x5E93;</li>
<li>&#x4E13;&#x95E8;&#x7528;&#x4E8E;&#x6570;&#x636E;&#x6316;&#x6398;&#x7684;&#x5F00;&#x6E90;python&#x5E93;</li>
<li><strong>&#x4EE5;Numpy&#x4E3A;&#x57FA;&#x7840;&#xFF0C;&#x501F;&#x529B;Numpy&#x6A21;&#x5757;&#x5728;&#x8BA1;&#x7B97;&#x65B9;&#x9762;&#x6027;&#x80FD;&#x9AD8;&#x7684;&#x4F18;&#x52BF;</strong></li>
<li><strong>&#x57FA;&#x4E8E;matplotlib&#xFF0C;&#x80FD;&#x591F;&#x7B80;&#x4FBF;&#x7684;&#x753B;&#x56FE;</strong></li>
<li><strong>&#x72EC;&#x7279;&#x7684;&#x6570;&#x636E;&#x7ED3;&#x6784;</strong></li>
</ul>
<h2 id="2-&#x4E3A;&#x4EC0;&#x4E48;&#x4F7F;&#x7528;pandas">2 &#x4E3A;&#x4EC0;&#x4E48;&#x4F7F;&#x7528;Pandas</h2>
<p>Numpy&#x5DF2;&#x7ECF;&#x80FD;&#x591F;&#x5E2E;&#x52A9;&#x6211;&#x4EEC;&#x5904;&#x7406;&#x6570;&#x636E;&#xFF0C;&#x80FD;&#x591F;&#x7ED3;&#x5408;matplotlib&#x89E3;&#x51B3;&#x90E8;&#x5206;&#x6570;&#x636E;&#x5C55;&#x793A;&#x7B49;&#x95EE;&#x9898;&#xFF0C;&#x90A3;&#x4E48;pandas&#x5B66;&#x4E60;&#x7684;&#x76EE;&#x7684;&#x5728;&#x4EC0;&#x4E48;&#x5730;&#x65B9;&#x5462;&#xFF1F;</p>
<ul>
<li><p><strong>&#x589E;&#x5F3A;&#x56FE;&#x8868;&#x53EF;&#x8BFB;&#x6027;</strong></p>
<ul>
<li><p>&#x56DE;&#x5FC6;&#x6211;&#x4EEC;&#x5728;numpy&#x5F53;&#x4E2D;&#x521B;&#x5EFA;&#x5B66;&#x751F;&#x6210;&#x7EE9;&#x8868;&#x6837;&#x5F0F;&#xFF1A;</p>
</li>
<li><p>&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#xFF1A;</p>
<pre><code class="lang-python">array([[<span class="hljs-number">92</span>, <span class="hljs-number">55</span>, <span class="hljs-number">78</span>, <span class="hljs-number">50</span>, <span class="hljs-number">50</span>],
       [<span class="hljs-number">71</span>, <span class="hljs-number">76</span>, <span class="hljs-number">50</span>, <span class="hljs-number">48</span>, <span class="hljs-number">96</span>],
       [<span class="hljs-number">45</span>, <span class="hljs-number">84</span>, <span class="hljs-number">78</span>, <span class="hljs-number">51</span>, <span class="hljs-number">68</span>],
       [<span class="hljs-number">81</span>, <span class="hljs-number">91</span>, <span class="hljs-number">56</span>, <span class="hljs-number">54</span>, <span class="hljs-number">76</span>],
       [<span class="hljs-number">86</span>, <span class="hljs-number">66</span>, <span class="hljs-number">77</span>, <span class="hljs-number">67</span>, <span class="hljs-number">95</span>],
       [<span class="hljs-number">46</span>, <span class="hljs-number">86</span>, <span class="hljs-number">56</span>, <span class="hljs-number">61</span>, <span class="hljs-number">99</span>],
       [<span class="hljs-number">46</span>, <span class="hljs-number">95</span>, <span class="hljs-number">44</span>, <span class="hljs-number">46</span>, <span class="hljs-number">56</span>],
       [<span class="hljs-number">80</span>, <span class="hljs-number">50</span>, <span class="hljs-number">45</span>, <span class="hljs-number">65</span>, <span class="hljs-number">57</span>],
       [<span class="hljs-number">41</span>, <span class="hljs-number">93</span>, <span class="hljs-number">90</span>, <span class="hljs-number">41</span>, <span class="hljs-number">97</span>],
       [<span class="hljs-number">65</span>, <span class="hljs-number">83</span>, <span class="hljs-number">57</span>, <span class="hljs-number">57</span>, <span class="hljs-number">40</span>]])
</code></pre>
<p>&#x5982;&#x679C;&#x6570;&#x636E;&#x5C55;&#x793A;&#x4E3A;&#x8FD9;&#x6837;&#xFF0C;&#x53EF;&#x8BFB;&#x6027;&#x5C31;&#x4F1A;&#x66F4;&#x53CB;&#x597D;&#xFF1A;</p>
<p><img src="images/score&#x5BF9;&#x6BD4;.png" alt="image-20190624090345499"></p>
</li>
</ul>
</li>
<li><p><strong>&#x4FBF;&#x6377;&#x7684;&#x6570;&#x636E;&#x5904;&#x7406;&#x80FD;&#x529B;</strong></p>
<p><img src="images/&#x4FBF;&#x6377;&#x7684;&#x6570;&#x636E;&#x5904;&#x7406;&#x80FD;&#x529B;.png" alt=""></p>
</li>
</ul>
<ul>
<li><strong>&#x8BFB;&#x53D6;&#x6587;&#x4EF6;&#x65B9;&#x4FBF;</strong></li>
<li><strong>&#x5C01;&#x88C5;&#x4E86;Matplotlib&#x3001;Numpy&#x7684;&#x753B;&#x56FE;&#x548C;&#x8BA1;&#x7B97;</strong></li>
</ul>
<h2 id="3-&#x5C0F;&#x7ED3;">3 &#x5C0F;&#x7ED3;</h2>
<ul>
<li>pandas&#x7684;&#x4F18;&#x52BF;&#x3010;&#x4E86;&#x89E3;&#x3011;<ul>
<li>&#x589E;&#x5F3A;&#x56FE;&#x8868;&#x53EF;&#x8BFB;&#x6027;</li>
<li>&#x4FBF;&#x6377;&#x7684;&#x6570;&#x636E;&#x5904;&#x7406;&#x80FD;&#x529B;</li>
<li>&#x8BFB;&#x53D6;&#x6587;&#x4EF6;&#x65B9;&#x4FBF;</li>
<li>&#x5C01;&#x88C5;&#x4E86;Matplotlib&#x3001;Numpy&#x7684;&#x753B;&#x56FE;&#x548C;&#x8BA1;&#x7B97;</li>
</ul>
</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../Pandas/index.html" class="navigation navigation-prev " aria-label="Previous page: Pandas"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../Pandas/section2.html" class="navigation navigation-next " aria-label="Next page: Pandas数据结构"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"katex":{},"expandable-chapters":{},"splitter":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
